#include "Light.h"

Light::Light(){
	
	mLight = new D3DLIGHT9();
	ZeroMemory(mLight, sizeof(*(mLight)));
    mLight->Type = D3DLIGHT_DIRECTIONAL; 
    mLight->Diffuse.r = 0.5f;    
    mLight->Diffuse.g = 0.5f;    
    mLight->Diffuse.b = 0.5f;    
    mLight->Diffuse.a = 1.0f;

	mDir = new D3DVECTOR();
	
	mDir->x = -1.0f;
	mDir->y = -0.3f;
	mDir->z = -1.0f;
    mLight->Direction = *(mDir);    // set the direction

	mLightNum = -1;
	
	mOn = false;
}

D3DLIGHT9* Light::GetD3DLight(){
	return mLight;
}
D3DVECTOR* Light::GetDirection(){
	return mDir;
}
int Light::GetLightNumber(){
	return mLightNum;
}
bool Light::GetOn(){
	return mOn;
}

void Light::SetD3DLight(D3DLIGHT9* pLight)	{
	 mLight = pLight;
}
void Light::SetDirection(D3DVECTOR* pVect){
	mDir = pVect;
}
void Light::SetLightNumber(int pNum){
	mLightNum = pNum;
}
void Light::SetOn(bool pOn){
	mOn = pOn;
}